﻿<UserControl x:Class="OnlineBattlemat.JoinSessionControl"
    xmlns="http://schemas.microsoft.com/client/2007" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    Width="400" Height="210">
    <Border >
        <Grid x:Name="LayoutRoot" >
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="125"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>

            <Rectangle Stroke="Black" RadiusX="15" RadiusY="15" Width="390" Height="200" Grid.RowSpan="5" Grid.ColumnSpan="2" Opacity=".8">
                <Rectangle.Fill>
                    <LinearGradientBrush StartPoint="0,0" EndPoint=".25,.25">
                        <GradientStop Color="Sienna" Offset="0"/>
                        <GradientStop Color="Chocolate" Offset="1"/>
                    </LinearGradientBrush>
                </Rectangle.Fill>
            </Rectangle>

            <TextBlock Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2" HorizontalAlignment="Left" Margin="15,10,10,0" FontWeight="Bold" FontSize="18">Join Session</TextBlock>

            <TextBlock Grid.Row="1" HorizontalAlignment="Right" Margin="25,20,5,10">Session</TextBlock>
            <TextBox x:Name="x_SessionTextBox" Grid.Row="1" Grid.Column="1" HorizontalAlignment="Left" KeyDown="x_TextBoxes_KeyDown" Width="200" Margin="5,20,25,10"></TextBox>

            <TextBlock Grid.Row="2" HorizontalAlignment="Right" Margin="25,0,5,10">Password</TextBlock>
            <TextBox x:Name="x_PasswordTextBox" Grid.Row="2" Grid.Column="1" HorizontalAlignment="Left" Width="200" Margin="5,0,25,10"></TextBox>

            <TextBlock Grid.Row="3" HorizontalAlignment="Right" Margin="25,0,5,0">Name</TextBlock>
            <TextBox x:Name="x_NameTextBox" Grid.Row="3" Grid.Column="1" HorizontalAlignment="Left" Width="200" Margin="5,0,25,0"></TextBox>

            <StackPanel Orientation="Horizontal" Grid.Row="4" Grid.ColumnSpan="2" HorizontalAlignment="Right" Margin="10,10,15,10">
                <Button x:Name="x_JoinButton" Click="x_JoinButton_Click" Width="100" Content="Join"/>
                <Button x:Name="x_CancelButton" Click="x_CancelButton_Click" Content="Cancel" Width="100" Margin="5,0,0,0"/>
            </StackPanel>
        </Grid>
    </Border>
</UserControl>
